package util
{
	import mx.collections.ArrayList;
	
	import spark.components.DataGrid;

	public class OperateDataGrid extends  DataGrid
	{
		private var _editRole:String = "";
		private var _deleteRole:String = "";
		private var _isEditValid:Boolean = true;
		private var _isDeleteValid:Boolean = true;
		public function OperateDataGrid()
		{
			super();
		}
		
		public function isContains(sourceStr:String,targetStr:String):Boolean
		{
			if(sourceStr != null)
			{
				var roles:Array = sourceStr.split(",");
				for (var i:int=0; i<roles.length; i++)
				{
					if(roles[i] == targetStr)
					{
						return true;
						break;
					}
				}
			}
			return false;
		}
		public function set EditRole(value:String):void
		{
			_editRole = value;
		}
		
		public function set DeleteRole(value:String):void
		{
			_deleteRole = value;
		}
		
		public function get isEditValid():Boolean
		{
			return _isEditValid;
		}
		public function get isDeleteValid():Boolean
		{
			return _isDeleteValid;
		}
	}
}